public class Test1 {
    public static void main(String[] args) {

        Glede[] glede = new Glede[2];

        glede[0] = new Glede(100, 2);
        glede[1] = new Glede(200, 4);

        for (int i = 0; i < 2; i++) {
            System.out.println(glede[i].MySpeed());
            glede[i].sound();
        }
    }
}

interface Flyable {
    public abstract int MySpeed();
}

class Animal {
    int leg;

    public Animal() {

    }

    public Animal(int leg) {
        this.leg = leg;
    }

    public void sound() {

    }
}

class Glede extends Animal implements Flyable {
    int speed;

    public Glede(int speed, int leg) {
        super(leg);
        this.speed = speed;
    }

    public int MySpeed() {
        return this.speed;
    }

    public void sound() {
        System.out.println("嘎......");
    }
}